package com.jk.service.impl;

import com.github.pagehelper.PageHelper;
import com.jk.bean.MonthGuanZhu;
import com.jk.bean.Page;
import com.jk.bean.SendPage;
import com.jk.mapper.MonthGuanZhuMapper;
import com.jk.service.MonthGuanZhuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 骚骚的🐏
 * @Author: 杨
 * @Date: 2019/3/7 10:17
 */
@Service
public class MonthGuanZhuServiceImpl implements MonthGuanZhuService {
   @Autowired
   private MonthGuanZhuMapper monthGuanZhuMapper;

    @Override
    public SendPage queryMonthGuanZhu(Page page) {
        List<MonthGuanZhu> list3=monthGuanZhuMapper.queryMonthGuanZhu();
        PageHelper.startPage(page.getPage(),page.getRows());
        List<MonthGuanZhu> list2=monthGuanZhuMapper.queryMonthGuanZhu();
        SendPage sendPage2 = new SendPage(list3.size(),list2);
        return sendPage2;
    }
    //清零月排行
    @Override
    public void updateAuthorMonthattention() {
        monthGuanZhuMapper.updateAuthorMonthattention();
    }
}
